package com.xxl.job.executor.jobhandler;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import com.xxl.job.executor.service.IEnShiftService;
import com.xxl.job.executor.service.IInlistService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * MTC入口值班表同步任务
 * @author 曾智波
 */
@JobHandler(value="EnShiftHandler")
@Component
public class EnShiftHandler extends IJobHandler {
    @Autowired
    private IEnShiftService enShiftService;

    @Override
    public ReturnT<String> execute(String param) throws Exception {
        XxlJobLogger.log("开始执行[入口值班全表同步]数据同步任务");
        enShiftService.syncRecord();//调用同步数据方法
        XxlJobLogger.log("执行[入口值班全表同步]数据同步任务结束");
        return SUCCESS;
    }

}
